package com.ssy.lingxi.order.handler.annotation;

import com.ssy.lingxi.order.handler.validator.DeliverPeriodValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 订单配送时间段格式字符串校验注解
 * @author 万宁
 * @version 2.0.0
 * @date 2020-10-22
 */
@Target({ElementType.TYPE, ElementType.FIELD})
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {DeliverPeriodValidator.class})
public @interface DeliverPeriodAnnotation {
    boolean nullable() default true;

    String message() default "订单交付日期（配送时间段）格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
